<!--  左侧菜单  -->

{{!yield}}

<!-- <ul class="nav navbar-nav side-nav collapsed" id="sidebar" tabindex="5000" style="overflow: hidden; outline: none;"> -->

<li class="collapsed-content">
  <ul>
    <li class="search"><!-- Collapsed search pasting here at 768px --></li>
  </ul>
</li>

<li class="navigation" >
  <!-- <a href="#" class="sidebar-toggle" data-toggle="#navigation"> -->
  {{#link-to 'todoitems' class="sidebar-toggle" data-toggle="#navigation"}}
      清单项
      <!-- 点击加号弹出一个表单，用于增加分类，由于弹出层的原因放在index.hbs才不会被遮盖 -->
  <i class="fa fa-plus" {{action 'toAddClassifyModal'}} title="新增清单项"></i>
  {{/link-to}}
<!-- </a> -->

  <ul class="menu">
    <li class="li-selector active" style="cursor: pointer;" onmousemove="msov(this)" onmouseout="msot(this)">
        <a {{action 'setProjCoce' 'myTodos'}} onclick="setIcon(this)" id="myTodos">
            <i class="fa fa-list"></i> 我的TODO
            {{!completed-todos-count-by-classify-cpm projCode='myTodos' store=store}}
            {{no-completed-todos-count-by-classify projCode='myTodos' store=store}}
        </a>
    </li>
    {{#each projects as |item|}}
        <li class="li-selector" onmousemove="msov(this)" onmouseout="msot(this)">
            <!-- {{__BASEURL__}}?projCode={{item.projCode}} -->
          <a href="#" {{action 'setProjCoce' item.projCode}} onclick="setIcon(this)">
            <i class="fa fa-list" {{action 'toEditClassify' item.id}}></i> {{item.projName}}
            {{!completed-todos-count-by-classify-cpm projCode=item.projCode store=store}}
            {{no-completed-todos-count-by-classify projCode=item.projCode store=store}}
          </a>
        </li>
    {{/each}}

  </ul>

</li>

<!-- </ul> -->

<script type="text/javascript">
function msov(self) {
    $(self).addClass("hovered");
    $("#sidebar").addClass("open");
}
function msot(self) {
    $(self).removeClass("hovered");
    $("#sidebar").removeClass("open");
}
// $(function() {
//     $(".menu > li").hover(function() {
//         console.log('this.......');
//         $(this).addClass("hovered");
//         $("#sidebar").addClass("open");
//     }, function() {
//         console.log('this.22222......');
//         $(this).removeClass("hovered");
//         $("#sidebar").removeClass("open");
//     });
// });

</script>
